﻿using System;
using System.Globalization;
using System.Windows.Data;
using LFSRecord2.Misc;
using LFSRecord2.Model;

namespace LFSRecord2.View.Converters
{
    public class FrameNumTimeStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int currentFrame = (int)value;
            return TimeHelper.FrameNumToPlayHeadText(currentFrame, LfsRecordController.project.FPS);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
